Ext.define("core.jbpm.view.ProcessMountInForm", {
			extend:"Ext.form.Panel",
			alias : 'widget.processMountInForm',
			id:'processMountInSaveId',
			tbar : [{
						xtype : "button",
						text : "保存信息",
						ref : "processMountInSave",
						iconCls : "table_save"
			}],
			labelAlign : 'right',
			labelWidth : 60,
			border : 0,
			layout : {
				type : "table",
				columns : 2
			},
			items : [{
						xtype : "textfield",
						fieldLabel : "主键",
						name : "id",
						id:'baseId',
						hidden : true
					},{
						xtype : "textfield",
						fieldLabel : "主表",
						name : "processFunMount.id",
						id:'processFunMountId',
						hidden : true
					},{
						xtype : "textfield",
						fieldLabel : "所属系统id",
						name : "system.id",
						id:'wFSystemId',
						hidden : true
					},{
						xtype : "textfield",
						fieldLabel : "所属模块id",
						name : "module.id",
						id:'wFModuleId',
						hidden : true
					},{
						xtype : "textfield",
						fieldLabel : "项目id",
						name : "projectId",
						id:'projectId',
						hidden : true
					},{
						xtype : "textfield",
						fieldLabel : "标段id",
						name : "sectionId",
						id:'sectionId',
						hidden : true
					},{
						xtype : "textfield",
						fieldLabel : "所属机构单位id",
						name : "orgId",
						id:'orgId',
						hidden : true
					}, {
						xtype : "wfSetTypeCombos"
					}, {
						xtype : "wfSystemButtons",
						fieldLabel: "<font color='red'>*</font>所属系统", 
						labelAlign : 'right',
						id : 'wFSystemName',
					    onTrigger2Click : function(){
					       var v=this;
					        //项目选择
							var responObj=v;
							var win=Ext.create("core.jbpm.view.taskForm.WfSystemWindow", {
								responseObj:responObj,
								multiSelect:false
							}).show();
							//加载数据
							var store = win.down("wfSystemGrid").getStore();
							store.getProxy().extraParams = {
								  'wFSystemBean.statuts':'1'
							};
						    store.load();
					    }
					}, {
						xtype : "projectButtons",
						fieldLabel: '所属项目', 
						labelAlign : 'right',
						id : 'projectName',
						name:'projectName',
					    onTrigger2Click : function(){
					      var v=this;
					       var form=v.up("processMountInForm");
					       var formObj=form.getForm();
					       var stsId=formObj.findField('wFSystemId').getValue();
					       if(stsId!=undefined && stsId!=null &&''!=stsId){
						        //项目选择
								var responObj=v;
								var win=Ext.create("core.jbpm.view.taskForm.ProjectWindow", {
									responseObj:responObj,
									multiSelect:false
								}).show();
								//加载数据
								var store = win.down("projectGrid").getStore();
								store.getProxy().extraParams = {
									  'projectInfoWfBean.status' :'1',
									  'wFSystemBean.id':stsId
								};
							    store.load();
					       }else{
						       Ext.Msg.alert("提示", "请选择所属系统");
						    }
					    }
					}, {
						xtype : "sectionButtons",
						fieldLabel : "所属标段",
						labelAlign : 'right',
						id : 'sectionName',
						name : 'sectionName',
					    onTrigger2Click : function(){
					       var v=this;
					       var form=v.up("processMountInForm");
					       var formObj=form.getForm();
					       var projectId=formObj.findField('projectId').getValue();
					       if(projectId!=undefined && projectId!=null  &&''!=projectId){
						        //标段选择处理
								var responObj=v;
								var win=Ext.create("core.jbpm.view.taskForm.SectionWindow", {
									responseObj:responObj,
									multiSelect:false
								}).show();
								//加载数据
								var store = win.down("sectionGrid").getStore();
								store.getProxy().extraParams = {
									  'sectionWfBean.status' :'1',
									  'sectionWfBean.projectId':projectId
								};
							    store.load();
						    }else{
						       Ext.Msg.alert("提示", "请选择所属项目");
						    }
					    }
					}, {
						xtype : "wfSetOrgsButtons",
						fieldLabel: '所属单位', 
						labelAlign : 'right',
						id : 'wfSetOrgsName',
						name : 'orgName',
					    onTrigger2Click : function(v){
					       var v=this;
					       var form=v.up("processMountInForm");
					       var formObj=form.getForm();
					       var stsId=formObj.findField('wFSystemId').getValue();
					       if(stsId!=undefined && stsId!=null &&''!=stsId){
						        //单位选择处理
								var responObj=v;
								responObj.sysId=stsId;
								//openSysOrg('orgId','rogName','orgType') ;
								var win=Ext.create("core.jbpm.view.taskForm.WfSetOrgsWindow", {
									responseObj:responObj,
									multiSelect:false
								}).show();
					        }else{
						       Ext.Msg.alert("提示", "请选择所属系统");
						    }
						}    
					},{
						xtype : "wfModuleButtons",
						fieldLabel : "<font color='red'>*</font>业务模块",
						labelAlign : 'right',
						id : 'wFModuleName',
						onTrigger2Click:function(){
						var v=this;
						var form=v.up("processMountInForm");
					       var formObj=form.getForm();
					       var wfTypeId=formObj.findField('wfTypeId').getValue();
					       if(wfTypeId!=undefined && wfTypeId!=null &&''!=wfTypeId){
							 //业务模块选择处理
							var responObj=v;
							var win=Ext.create("core.jbpm.view.taskForm.WfModuleWindow", {
								responseObj:responObj,
								multiSelect:false
							}).show();
							//加载数据
							var store = win.down("wfModuleGrid").getStore();
							store.getProxy().extraParams = {
								  'wfModuleBean.statuts' :'1',
								  'wfType':wfTypeId
							};
						    store.load();
						  }else{  
						    Ext.Msg.alert("提示", "请选择流程类型");
						  }
						}
					}, {
						columnWidth :2,
						layout : "column",
						items : [ {
							layout : "form",
							items : [ {
								xtype : 'textareafield',
								id : 'remark',
								name : 'remark',
								width : '100%',
								labelAlign : 'right',
								height : 50,
								fieldLabel : '说明'
							} ]
						} ]
					}
					]

		});